<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * @package    symfony
 * @subpackage plugin
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfPropelParanoidBehavior.class.php 15813 2009-02-26 14:13:28Z fabien $
 */
class sfPropelCreatedByBehavior
{


  public function postSave($object, $con = null)
  {

    if(!$object->getCreatedBy()){
        $object->setCreatedBy(sfContext::getInstance()->getUser()->getGuardUser()->getId());
        //print_R($object);exit;
        $object->save();
    }
    

    return true;
  }

}
